<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="Dayu" content="created  by Dayu"/>
    <title>用户注册</title>
    <link rel="stylesheet" href="/static/frontend/css/login.css"/>
    <script src="/static/frontend/js/jquery-1.10.1.js"></script>
</head>
<body class="register_page">
<div class="regist">
    <div class="regist_center">
        <div class="logo">
            <img src="/static/frontend/image/logo_top.png" alt="My Go Mall">
        </div>
        <div class="regist_top">
            <h2>注册NFT Cosmos账户</h2>
        </div>
        <div class="regist_main center">
            <p>请输入您注册账户的密码</p>
            <br>
            <br>
            <form action="/auth/doRegister" method="post" id="form">
                <input type="hidden" name="sign" value="{{.sign}}"/>
                <input type="hidden" name="sms_code" value="{{.sms_code}}"/>
                <div>
                    <input class="form_input" type="password" id="password" name="password" placeholder="请输入密码"/>
                </div>
                <div>
                    <input class="form_input" type="password" id="rpassword" name="rpassword" placeholder="请输入确认密码"/>
                </div>
                <div class="error">
                </div>
                <div class="regist_submit">
                    <input class="submit" id="nextStep" type="submit" name="submit" value="完成注册">
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    $(function () {
        $("#form").submit(function () {
            $(".error").html("")
            var password = $('#password').val();
            var rpassword = $('#rpassword').val();
            if (password.length < 6) {
                $(".error").html("用户名的长度不能小于6位")
                return false;
            }
            if (password != rpassword) {
                $(".error").html("密码和确认密码不一致")
                return false;
            }
            
            return true;
        })
    })
</script>
</body>
</html>